﻿using System.Collections.Generic;
using LiteDB;

namespace Jinndev.DB {

    public static class DatabaseUtil {

        private static Dictionary<string, LiteDatabase> dbs = new Dictionary<string, LiteDatabase>();

        public static LiteDatabase GetOrCreateFileDB(string path) {
            LiteDatabase db;
            if (dbs.TryGetValue(path, out db)) {
                return db;
            }
            db = new LiteDatabase(path);
            dbs.Add(path, db);

            return db;
        }

        public static void Test(LiteDatabase db) {

        }

    }

}